import request from "@/api/request";
import type { SunnyQuartzTask } from "@/types/sunnyQuartzTask/type";
import type { AxiosPromise } from "axios";

export function listSunnyQuartzTasksApi(): AxiosPromise<SunnyQuartzTask[]> {
  return request({
    url: "/sunnyQuartzTask",
    method: "get",
  });
}

export function addSunnyQuartzTaskApi(data: SunnyQuartzTask) {
  return request({
    url: "/sunnyQuartzTask",
    method: "post",
    data,
  });
}

export function updateSunnyQuartzTaskApi(data: SunnyQuartzTask) {
  return request({
    url: "/sunnyQuartzTask",
    method: "put",
    data,
  });
}

export function deleteSunnyQuartzTaskApi(id: number) {
  return request({
    url: "/sunnyQuartzTask/" + id,
    method: "delete",
  });
}
